<%@ Page Language="VB" MasterPageFile="~/AdminMasterPage.master" AutoEventWireup="false" 
CodeFile="Add_Funds.aspx.vb" Inherits="Admin_Add_Funds" title="CIMS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager>
    &nbsp;
   <div id="divEntry" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" width="580">
        <tr><td>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td colspan="2"  style="font-size: 10pt; width: 100%; font-family: Verdana; height: 25px;" >
                        <asp:LinkButton ID="lbtnCopy" runat="server" CausesValidation="False" Font-Underline="True"
                            ForeColor="Black" TabIndex="11">Copy Existing Funds</asp:LinkButton></td> 
                </tr>
                <tr>
                    <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
                        &nbsp;Broker Name:</td>
                    <td style="width: 150px; height: 25px;" align="left">
                        <asp:DropDownList ID="broker_cmb" runat="server" Width="288px" AutoPostBack="True" ValidationGroup="main">
                        </asp:DropDownList></td>                    
                </tr>
                <tr>
                    <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
                        &nbsp;Provider Name:</td>
                    <td style="width: 150px; height: 25px;" align="left">
                        <asp:DropDownList ID="provider_cmb" runat="server" Width="288px" AutoPostBack="True" ValidationGroup="main">
                        </asp:DropDownList>
                        </td>                    
                </tr>
                <tr>
                    <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
                        &nbsp;Product Name:</td>
                    <td style="width: 210px; height: 25px;" align="left">
                        <asp:DropDownList ID="product_cmb" runat="server" Width="288px" AutoPostBack="True" ValidationGroup="main">
                        </asp:DropDownList></td>                    
                </tr>
            </table>
        </td></tr>        
    </table>
    
    <asp:Panel ID="AddEdit_Panel" runat="server"  Visible="false" >
    <table border="0" cellpadding="0" cellspacing="0" width="580">    
        <tr><td>
            <table border="0" cellpadding="0" cellspacing="0" width="100%" style="height: 40px">
                <tr>
                    <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 24px;" align="left">
                        &nbsp;Fund Code:</td>
                    <td style="width: 150px; height: 24px;" align="left">
                        <asp:TextBox ID="Code_txt" runat="server" Width="136px" MaxLength="20" ValidationGroup="main"></asp:TextBox></td>                    
                    <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 24px;" align="left">
                        &nbsp;Fund Name:</td>
                    <td style="width: 210px; height: 24px;" align="left">
                        <asp:TextBox ID="Name_txt" runat="server" Width="168px" MaxLength="200" ValidationGroup="main"></asp:TextBox></td>                    
                </tr>
                <tr>
                    <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 28px;" align="left">
                        &nbsp;Currency:</td>
                    <td style="width: 150px; height: 28px;" align="left">
                        <asp:DropDownList ID="currency_cmb" runat="server" Width="144px" ValidationGroup="main">
                        </asp:DropDownList></td>                    
                    <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 28px;" align="left">
                        </td>
                    <td style="width: 210px; height: 28px;" align="left">
                        </td>                    
                </tr>
            </table>
        </td></tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="580">        
        <tr><td>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td align="right" style="height: 24px">
                        <asp:Button ID="Save_btn" runat="server" Text="Save" BackColor="Gainsboro" Font-Names="Verdana" Width="64px" ValidationGroup="main" />&nbsp;
                        <asp:Button ID="Cancel_btn" runat="server" Text="Back" BackColor="Gainsboro" Font-Names="Verdana" Width="64px" CausesValidation="False" />
                        &nbsp;&nbsp;
                    </td>                    
                </tr>
            </table>
        </td></tr>
    </table>
    </asp:Panel>
    
    <br />

    <table cellpadding="0" cellspacing="0" width="580" style="font-family:Verdana; font-size:10pt">
        <tr>
        <td align="left" style="height: 16px"> Funds: 
            <asp:Label ID="Results_lbl" runat="server"></asp:Label></td>
        <td align="right" style="height: 16px;"> 
            <asp:LinkButton ID="Add_btn" runat="server" ForeColor="Black"
                TabIndex="11" Font-Underline="True" CausesValidation="False">Add New Fund</asp:LinkButton></td>
        </tr>
    </table>
        
    <table cellpadding="0" cellspacing="0">
        <tr><td style="width: 580px;">
            <asp:DataGrid ID="DataGrid" runat="server" AutoGenerateColumns="False" BackColor="White"
                BorderColor="White" BorderStyle="Solid" BorderWidth="1px" CellPadding="1" Font-Names="Verdana" Width="580px" Font-Size="Small" TabIndex="12" AllowSorting="True" AllowPaging="True">
                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                <PagerStyle BackColor="White" ForeColor="#330099" HorizontalAlign="Left" Mode="NumericPages" PageButtonCount="9" Position="Top" />
                <AlternatingItemStyle BackColor="#D7DADF" />
                <ItemStyle BackColor="#F2F3F5" ForeColor="Black" />
                <HeaderStyle BackColor="#105BA4" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:BoundColumn HeaderText="Fund Code" DataField="fund_cd">
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Left" />
                        <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" />
                    </asp:BoundColumn>
                    <asp:BoundColumn HeaderText="Fund Name" DataField="fund_desc">
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Left" />
                        <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" />
                    </asp:BoundColumn>
                    <asp:ButtonColumn CommandName="Edit" Text="Edit">
                        <HeaderStyle Width="40px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" />
                    </asp:ButtonColumn>
                    <asp:TemplateColumn>
                        <HeaderStyle Width="45px" />
                        <ItemTemplate>
                            <asp:LinkButton ID="Delete_btn" runat="server" CommandName="Delete" ForeColor="Black"  CausesValidation="false">Delete</asp:LinkButton>
                            <ajaxToolkit:ConfirmButtonExtender
                                ID="ConfirmButtonExtender1" runat="server" ConfirmText="Continue delete?" TargetControlID="Delete_btn">
                            </ajaxToolkit:ConfirmButtonExtender>
                        </ItemTemplate>
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" />
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="prdt_cd" Visible="False"></asp:BoundColumn>
                    <asp:BoundColumn DataField="currency_cd" Visible="False"></asp:BoundColumn>
                </Columns>
            </asp:DataGrid></td></tr>
    </table>
   </div>          
    <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="broker_cmb"
        ErrorMessage="Broker Required" ForeColor="White" Text="." ValidationGroup="main"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rfv2" runat="server" ControlToValidate="Provider_cmb"
        ErrorMessage="Provider Required" ForeColor="White" Text="." ValidationGroup="main"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rfv3" runat="server" ControlToValidate="Product_cmb"
        ErrorMessage="Product Required" ForeColor="White" Text="." ValidationGroup="main"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rfv4" runat="server" ControlToValidate="Code_txt"
        ErrorMessage="Fund Required" ForeColor="White" Text="." ValidationGroup="main"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rfv5" runat="server" ControlToValidate="Name_txt"
        ErrorMessage="Fund Name Required" ForeColor="White" Text="." ValidationGroup="main"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rfv6" runat="server" ControlToValidate="currency_cmb"
        ErrorMessage="Currency Required" ForeColor="White" Text="." ValidationGroup="main"></asp:RequiredFieldValidator>&nbsp;
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
        ShowSummary="False" />
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server"
        TargetControlID="rfv1">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server"
        TargetControlID="rfv2">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server"
        TargetControlID="rfv3">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server"
        TargetControlID="rfv4">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server"
        TargetControlID="rfv5">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server"
        TargetControlID="rfv6">
    </ajaxToolkit:ValidatorCalloutExtender>
    &nbsp;
   <asp:Panel ID="pnlCopy" runat="server" HorizontalAlign="Center" Width="580px" BackColor="White" Visible="False">
  <!-- 105ba4 --> 
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
       <tr>
            <td colspan="2" style="font-family: Arial; font-weight:bold; font-size:11pt; background-color: #105ba4; color:White;  height:25px;">
                Source
            </td>
       </tr>
       <tr>
           <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
               &nbsp;Broker Name:</td>
           <td style="width: 150px; height: 25px;" align="left">
               <asp:DropDownList ID="ddlBrokerSource" runat="server" Width="288px" AutoPostBack="True" CausesValidation="True" ValidationGroup="Copy">
               </asp:DropDownList></td>
       </tr>
       <tr>
           <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
               &nbsp;Provider Name:</td>
           <td style="width: 150px; height: 25px;" align="left">
               <asp:DropDownList ID="ddlProviderSource" runat="server" Width="288px" AutoPostBack="True" CausesValidation="True" ValidationGroup="Copy">
               </asp:DropDownList>
           </td>
       </tr>
       <tr>
           <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
               &nbsp;Product Name:</td>
           <td style="width: 210px; height: 25px;" align="left">
               <asp:DropDownList ID="ddlProductSource" runat="server" Width="288px" AutoPostBack="True" CausesValidation="True" ValidationGroup="Copy">
               </asp:DropDownList></td>
       </tr>
   </table>
   <table border="0" cellpadding="0" cellspacing="0" width="100%">
       <tr>
            <td colspan="2"><asp:DataGrid ID="dgSource" runat="server" AutoGenerateColumns="False" BackColor="White"
                BorderColor="White" BorderStyle="Solid" BorderWidth="1px" CellPadding="1" Font-Names="Verdana" Width="580px" Font-Size="Small" TabIndex="12" AllowSorting="True" AllowPaging="True">
                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                <PagerStyle BackColor="White" ForeColor="#330099" HorizontalAlign="Left" Mode="NumericPages" PageButtonCount="9" Position="Top" />
                <AlternatingItemStyle BackColor="#D7DADF" />
                <ItemStyle BackColor="#F2F3F5" ForeColor="Black" />
                <Columns>
                    <asp:BoundColumn HeaderText="Fund Code" DataField="fund_cd">
                        <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" />
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Left" />
                    </asp:BoundColumn>
                    <asp:BoundColumn HeaderText="Fund Name" DataField="fund_desc">
                        <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" />
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Left" />
                    </asp:BoundColumn>
                </Columns>
                <HeaderStyle BackColor="#105BA4" Font-Bold="True" ForeColor="White" />
            </asp:DataGrid></td>
       </tr>
   </table>
   <br />
   <table border="0" cellpadding="0" cellspacing="0" width="100%">
       <tr>
            <td colspan="2" style="font-family: Arial; font-weight:bold; font-size:11pt; background-color: #105ba4; color:White;  height:25px;">
                Destination
            </td>
       </tr>
       <tr>
           <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
               &nbsp;Broker Name:</td>
           <td style="width: 150px; height: 25px;" align="left">
               <asp:DropDownList ID="ddlBrokerDest" runat="server" Width="288px" AutoPostBack="True" CausesValidation="True" ValidationGroup="Copy">
               </asp:DropDownList></td>
       </tr>
       <tr>
           <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
               &nbsp;Provider Name:</td>
           <td style="width: 150px; height: 25px;" align="left">
               <asp:DropDownList ID="ddlProviderDest" runat="server" Width="288px" AutoPostBack="True" CausesValidation="True" ValidationGroup="Copy">
               </asp:DropDownList>
           </td>
       </tr>
       <tr>
           <td style="font-size: 10pt; width: 110px; font-family: Verdana; height: 25px;" align="left">
               &nbsp;Product Name:</td>
           <td style="width: 210px; height: 25px;" align="left">
               <asp:DropDownList ID="ddlProductDest" runat="server" Width="288px" CausesValidation="True" ValidationGroup="Copy">
               </asp:DropDownList></td>
       </tr>
   </table> 
  <br /> 
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td style=" width:100%; height: 24px;"><asp:Button ID="btnCopyFunds" runat="server" Text="Copy Funds" BackColor="Gainsboro" Font-Names="Verdana" Width="106px" ValidationGroup="copy" />
                &nbsp;
                <asp:Button ID="btnCancelCopy" runat="server" Text="Cancel" BackColor="Gainsboro" Font-Names="Verdana" Width="64px" CausesValidation="False" /></td> 
        </tr>
  </table>
   
   </asp:Panel> 
    <asp:RequiredFieldValidator ID="rf1" runat="server" ControlToValidate="ddlBrokerSource"
        ErrorMessage="Broker Required" ForeColor="White" Text="." ValidationGroup="copy"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rf2" runat="server" ControlToValidate="ddlProviderSource"
        ErrorMessage="Provider Required" ForeColor="White" Text="." ValidationGroup="copy"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rf3" runat="server" ControlToValidate="ddlProductSource"
        ErrorMessage="Product Required" ForeColor="White" Text="." ValidationGroup="copy"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rf4" runat="server" ControlToValidate="ddlBrokerDest"
        ErrorMessage="Broker Required" ForeColor="White" Text="." ValidationGroup="copy"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rf5" runat="server" ControlToValidate="ddlProviderDest"
        ErrorMessage="Provider Required" ForeColor="White" Text="." ValidationGroup="copy"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="rf6" runat="server" ControlToValidate="ddlProductDest"
        ErrorMessage="Product Required" ForeColor="White" Text="." ValidationGroup="copy"></asp:RequiredFieldValidator><ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server"
        TargetControlID="rf1">
        </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server"
        TargetControlID="rf2">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="server"
        TargetControlID="rf3">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server"
        TargetControlID="rf4">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server"
        TargetControlID="rf5">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender12" runat="server"
        TargetControlID="rf6">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender2" runat="server" ConfirmText="Copying Funds will delete existing items in the Destination. Do you want to Continue?"
        TargetControlID="btnCopyFunds">
    </ajaxToolkit:ConfirmButtonExtender>
</asp:Content>